import { createApp } from 'vue'
import App from './App.vue'
import store from './store'
import router from './router'
import i18n from './i18n'
import directives from './directives'
import 'virtual:svg-icons-register'
import './assets/font/index.css'
import 'animate.css'
import './styles/reset.scss'
// 通用字体
import 'vfonts/Lato.css'
// 等宽字体1
import 'vfonts/FiraCode.css'
import './styles/app.scss'

import naive from 'naive-ui'

const setupApp = async () => {
	const app = createApp(App)

	app.use(naive)
	app.use(store)
	app.use(router)
	app.use(i18n)
	app.use(directives)
	app.mount('#app')

	app.config.errorHandler = (err, instance, info) => {
		console.error(err)
		console.error(instance)
		console.error(info)
	}
}

setupApp()
